<div class="content-inner">
    <div class="marg20-btm">
        <a href="<?php echo site_url('backend_pages/addmenu'); ?>" class="btn btn-primary">&#43; Add Menu </a>
        <br /> <br />
         <?php
		 
		 $action3 = $this->uri->segment(3);
         $action4 = $this->uri->segment(4);
        if ($action3 == 'success' && $action4 =='del') {
            ?>
           <span id="error" style="background: none repeat scroll 0 0 #42C8D1;
                  color: white;
                  float: left;
                  line-height: 23px;
                  padding: 3px;
                  width: 500px;
                  border-radius: 3px;
                  ">Delete successfull !!</span>
            <?php  }
			else if($action3 == 'success' && $action4 =='edit'){
				?>
				 <span id="error" style="background: none repeat scroll 0 0 #42C8D1;
                  color: white;
                  float: left;
                  line-height: 23px;
                  padding: 3px;
                  width: 500px;
                  border-radius: 3px;
                  ">Edit successfull !!</span>
			<?php	}
			else if($action3 == 'success' && $action4 =='add'){
				?>
				 <span id="error" style="background: none repeat scroll 0 0 #42C8D1;
                  color: white;
                  float: left;
                  line-height: 23px;
                  padding: 3px;
                  width: 500px;
                  border-radius: 3px;
                  "> Add successfull !!</span>
			
		     <?php		}
			 ?>
			<script>
            	$('#error').show().delay(5000).fadeOut();	
            </script>
            
        <form class="pull-right form-inline" />
        <input type="text" placeholder="Find Item" />
        <input type="submit" name="submit" value="Search" class="btn" />
        </form> 
    </div>
    <table class="table table-bordered table-striped">
        <thead>
            <tr>
                <th><input type="checkbox" id="select_all" class="child" title="header=[Select All] body=[] fade=[on]" /></th>
                <th>ID Menu</th>
                <th>Title </th>
                <th>Link </th>
                <th>Categary </th>
                <th>status</th>
                <th>Action </th>
            </tr>
        </thead>
        <tbody>
            <?php
            if ($admin_menu->num_rows() > 0) {
                foreach ($admin_menu->result() as $row) {
                    echo '
                               <tr>
                                 <td><input type="checkbox" name="check_menu[]" id="check'.$row->menu_id.'" class="child" value="'.$row->menu_id.'"/></td>
                                 <td>' . $row->menu_id . '</td>
                                 <td>' . $row->menu_title . '</td>
                                 <td>' . $row->menu_link . '</td>
								 <td>' . $row->menu_type . '</td>
								<th class="center">';
								if($row->menu_statu_id==1){
								  echo '<a class="label label-success" href="'.site_url("backend_pages/StatusAction").'/'.$row->menu_statu_id.'/'.$row->menu_id.'" title="Click to Hide">Show</th>';
								}else{
							      echo '<a class="label label-success" href="'.site_url("backend_pages/StatusAction").'/'.$row->menu_statu_id.'/'.$row->menu_id.'" title="Click to Show">Hide</a>';
									}
								echo '</th>';
                                echo '<td>		
							    <a href=' . site_url("backend_pages/editmenu") . '/' . $row->menu_id . ' onclick="return confirm(\'Do you want to Update ?\')"; rel="tooltip" title="Edit" class="btn btn-primary"><i class="icon-edit"></i></a>';
                    echo '
                                     <a href=' . site_url('con_menu/del_menu') . '/' . $row->menu_id . ' rel="tooltip" title="Delete" class="btn btn-danger" onClick="return confirm(\'Are you sure to delete ?\')"><i class="icon-trash"></i></a></td>
                               </tr>';
                }
            }
            ?>

        </tbody>
    </table>
    <div class="form-inline">
        <select>
            <option />Bulk Actions 
            <option />Delete 
        </select>
        <input type="submit" value="Submit" class="btn btn-primary" onClick="return confirm('Are you sure ?');" />
    </div>
    <div class="pagination">
        <ul>

            <li><?php echo $pages; ?></li>

        </ul>
    </div> 
</div>